package com.management.system.server.impl;

import com.management.system.beans.user.TokenParam;
import com.management.system.beans.user.User;
import com.management.system.mapper.UserMapper;
import com.management.system.server.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserImpl implements UserServer {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> all() {
        return userMapper.all();
    }

    @Override
    public User login(String name) {
        return userMapper.login(name);
    }

    @Override
    public TokenParam token(String token) {
        return userMapper.token(token);
    }
}
